﻿using System.Linq;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using Photon;

public class UserInfo : Photon.MonoBehaviour 
{
	[SerializeField]public string userName;
	[SerializeField]public string message;



	void Start () 
	{	
		userName = AccountInfo.instance.Info.AccountInfo.Username.ToString ();

	}

	public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
	{
		if (stream.isWriting)
		{	
			stream.SendNext (userName);
		}else if (stream.isReading)
		{	
			userName = (string)stream.ReceiveNext ();
		}
	}


}
